<@override name="page-title">
添加项目管理信息
</@override>
<@override name="page-style">
<link rel="stylesheet" href="/assets/admin/css/plugins/iCheck/custom.css">
<link rel="stylesheet" href="/assets/admin/plugins/wangeditor/css/wangEditor.min.css">
<link rel="stylesheet" href="/assets/admin/css/plugins/file-upload/bootstrap-fileupload.css">
<link href="/assets/admin/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
</@override>
<@override name="page-body">

<div class="ibox-content">
    <form class="form-horizontal m-t" id="updateForm" enctype="multipart/form-data">
        <input type="hidden" name="pId" value="${project_manage.pId?default(null)}">
        
        <div class="form-group">
            <label class="col-xs-3 control-label">项目url：</label>
            <div class="col-xs-8">
                <input type="text" class="form-control" value="" id="projectUrl" name="projectUrl" placeholder="请输入url"
                        required="" aria-required="true">
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-3 control-label">项目名称：</label>
            <div class="col-xs-8">
                <input type="text" class="form-control" value="" id="name" name="name" placeholder="请输入项目名称"
                       minlength="2" required="" aria-required="true">
            </div>
        </div>
        
        <div class="form-group">
         <label class="col-xs-3 control-label">项目简介：</label>
            <div class="col-xs-8">
                <textarea class="form-control" id="summary" name="summary" rows="3"
                          placeholder="请输入项目简介"></textarea>
            </div>
        </div>
        
        <div class="form-group">
            <label class="col-xs-3 control-label">项目负责人：</label>
            <div class="col-xs-8">
                <input type="text" class="form-control" value="" id="principal" name="principal" placeholder="请输入项目负责人名字："
                       required="" aria-required="true">
            </div>
        </div>
        
        <div class="form-group">
            <label class="col-xs-3 control-label">联系方式：</label>
            <div class="col-xs-8">
                <input type="text" class="form-control" value="" id="phone" name="phone" placeholder="请输入项目负责人联系方式："
                       required="" aria-required="true">
            </div>
        </div>
        
        <div class="form-group">
            <label class="col-xs-3 control-label">项目图片：</label>
            <div class="col-xs-8">
                <div class="fileupload fileupload-new" data-provides="fileupload">
                    <div class="btn-group">
                        <label title="上传图片" for="fileupload" class="btn btn-primary">
                            <input type="file" accept="image/*" name="adminPManagePic" id="fileupload" class="hide">上传图片
                        </label>
                    </div>
                    <div class=" fileupload-new thumbnail" style="width: 200px; height: 150px;">
                        <img src="/assets/admin/img/noimage.jpg" alt="">
                    </div>
                    <div class="fileupload-preview fileupload-exists thumbnail" id="imgDiv"
                         style="max-width: 200px; max-height: 150px; line-height: 20px;"></div>
                </div>
            </div>
        </div>
        
        <div class="form-group">
        	<label class="col-xs-3 control-label">文件1上传：</label>
        	<div class="col-xs-8">
        		<input type="file" name="PManageAdminFil1">
        	</div>
        </div>
        
           <div class="form-group">
        	<label class="col-xs-3 control-label">文件2上传：</label>
        	<div class="col-xs-8">
        		<input type="file" name="PManageAdminFil2">
        	</div>
        </div>
        
           <div class="form-group">
        	<label class="col-xs-3 control-label">文件3上传：</label>
        	<div class="col-xs-8">
        		<input type="file" name="PManageAdminFil3">
        	</div>
        </div>
        
        <div class="form-group">
            <label class="col-xs-3 control-label">项目阶段：</label>
            <div class="col-xs-8">
                <input type="text" class="form-control" value="" id="stage" name="stage" placeholder="请输入项目阶段"
                       minlength="2" required="" aria-required="true">
            </div>
        </div>

        <div class="form-group">
            <label class="col-xs-3 control-label">发布日期：</label>
            <div class="col-xs-8">
                <div class="input-group date" id="pubdateDiv">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input type="text" class="form-control" placeholder="请输入发布时间" name="pmCreateTime">
                </div>
            </div>
        </div>

        <input type="hidden" name="status" value="${project_manage.status?default(null)}">
        <input type="hidden" name="status" value="${project_manage.userId?default(null)}">
        <div class="form-group">
            <div class="col-xs-12 col-xs-offset-4">
                <button class="btn btn-primary" type="submit">保存</button>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <button onClick="layer_close();" class="btn btn-default radius" type="button">取消</button>
            </div>
        </div>
    </form>
</div>
</@override>
<@override name="page-script">
<script type="text/javascript" src="/assets/admin/js/plugins/iCheck/icheck.min.js"></script>
<script type="text/javascript" src="/assets/admin/js/plugins/validate/jquery.validate.min.js"></script>
<script type="text/javascript" src="/assets/admin/js/plugins/validate/messages_zh.min.js"></script>
<script src="/assets/admin/js/plugins/file-upload/bootstrap-fileupload.js"></script>
<script src="/assets/admin/js/plugins/jquery-form/jquery.form.js"></script>
<script src="/assets/admin/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script src="/assets/admin/plugins/ueditor/ueditor.config.js"></script>
<script src="/assets/admin/plugins/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("#pubdateDiv").datepicker({
            autoclose: !0,
            clearBtn: true,
            todayHighlight: true
        });
        var ue = UE.getEditor('container');

        $("#updateForm").validate({
            submitHandler: function (form) {
                var index = parent.layer.getFrameIndex(window.name);
                $(form).ajaxSubmit({
                    url: "/admin/PManage/save.json",
                    type: "POST",
                    success: function (data) {
                        if (data.ret) {
                            parent.$("#layer-data").val('1');
                        } else {
                            parent.$("#layer-data").val(data.errmsg);
                        }
                        parent.layer.close(index);
                    }
                });
            }
        })
    })
    ;
</script>
</@override>
<@extends name="admin/common/common.ftl"/>